import sun.security.pkcs11.wrapper.CK_AES_CTR_PARAMS
import java.io.Closeable
import java.lang.Exception
import java.net.Socket

object ChatUtils{
    fun release(client:Socket,vararg params:Closeable){
        params.forEach {
            try {
                it?.close()
            }catch (e:Exception){
                e.printStackTrace()
                println("${it}关闭失败")
                println("Socket关闭")
                client.close()
            }
        }
    }
}